﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using socialnexus.classes.pages;
using socialnexus.classes.models;

namespace socialnexus.admin.Users
{
    public partial class Suspend : ProtectedPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SiteUser su = SiteUser.GetById(Request.QueryString["UserId"]);
            if (su != null)
            {
                su.IsActive = false;
                su.Update();
            }
            Response.Redirect(Request.ServerVariables["HTTP_REFERER"]);
            //Response.Redirect("~/admin/Users/Show.aspx?UserId=" + su.SiteUserId.ToString());
            Response.Close();
        }
    }
}
